//
//  DateViewController.m
//  PedometerTest
//
//  Created by Leming Deng on 2014-07-23.
//  Copyright (c) 2014 tdr. All rights reserved.
//

#import "DateViewController.h"

@interface DateViewController ()

@end

@implementation DateViewController
            
#pragma mark - Managing the date item

- (void)setDateItem:(id)newDateItem {
    if (_dateItem != newDateItem) {
        _dateItem = newDateItem;
            
        // Update the view.
        [self configureView];
    }
}

- (void)configureView {
    // Update the user interface for the date item.
    if (self.dateItem) {
        [self.picker setDate:self.dateItem];
    }
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self configureView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self.delegate dataSelectionView:self willFinishWithDate:[self.picker date]];
}

@end
